//
//  HomeFiveCollectionViewCell.m
//  CommunitySupermarketProiect
//
//  Created by 吕惠卿 on 2017/10/11.
//  Copyright © 2017年 吕惠卿. All rights reserved.
//

#import "HomeFiveCollectionViewCell.h"

@implementation HomeFiveCollectionViewCell
-(id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatUI];
    }
    return self;
}
-(void)creatUI{
    _img = [[UIImageView alloc]init];
    _img.backgroundColor = NavColor;
    [self addSubview:_img];
    [_img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).with.offset(8);
        make.height.mas_equalTo(20);
        make.width.mas_equalTo(4);
        make.centerY.mas_equalTo(self);
    }];
    _nameLab = [[UILabel alloc]init];
//    _nameLab.backgroundColor = [UIColor yellowColor];
    _nameLab.textAlignment = NSTextAlignmentLeft;
//    _nameLab.font = [UIFont systemFontOfSize:12.0];
//    _nameLab.textColor = [UIColor grayColor];
    [self addSubview:_nameLab];
    [_nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_img.mas_right).with.offset(5);
        make.height.mas_equalTo(30);
        make.width.mas_equalTo(73);
        make.centerY.mas_equalTo(self);
    }];
    _englishLab = [[UILabel alloc]init];
    //    _nameLab.backgroundColor = [UIColor yellowColor];
    _englishLab.textAlignment = NSTextAlignmentLeft;
    _englishLab.font = [UIFont systemFontOfSize:13.0];
    _englishLab.textColor = [UIColor lightGrayColor];
    [self addSubview:_englishLab];
    [_englishLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_nameLab.mas_right).with.offset(0);
        make.height.mas_equalTo(30);
        make.width.mas_equalTo(120);
        make.centerY.mas_equalTo(self);
    }];
    _jiantouimg = [[UIImageView alloc]init];
    _jiantouimg.image = [UIImage imageNamed:@"查看更多"];
    [self addSubview:_jiantouimg];
    [_jiantouimg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView.mas_right).with.offset(-8);
        make.height.mas_equalTo(20);
        make.width.mas_equalTo(10);
        make.centerY.mas_equalTo(self);
    }];
    
    _gengLab = [[UILabel alloc]init];
    _gengLab.text = @"查看更多";
    //    _nameLab.backgroundColor = [UIColor yellowColor];
    _gengLab.textAlignment = NSTextAlignmentRight;
    _gengLab.font = [UIFont systemFontOfSize:14.0];
    _gengLab.textColor = [UIColor grayColor];
    [self addSubview:_gengLab];
    [_gengLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(_jiantouimg.mas_left).with.offset(-5);
        make.height.mas_equalTo(30);
        make.width.mas_equalTo(73);
        make.centerY.mas_equalTo(self);
    }];

}
@end
